package com.erp.order.purchasing.model;

import com.erp.hr.base.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.List;
import java.util.Set;

/**
 * 采购申请详情 实体类
 * @Author: syz
 * @blame syz
 * @CreateTime: 2021/4/6
 */
@Data
@Entity
@DynamicInsert()
@DynamicUpdate()
@EqualsAndHashCode(callSuper = true)
@Table(name="purchasing_requisition_detail", schema="erp")
public class PurchasingRequisitionDetail extends BaseModel {

    private static final long serialVersionUID = 1L;

    /**
     * 申请id
     */
    @Column(name = "requisition_id")
    private Long requisitionId;

    /**
     * 询价单物资id
     */
    @Column(name = "inquiry_list_material_id")
    private Long inquiryListMaterialId;

    /**
     * 采购订单id
     */
    @Column(name = "purchase_order_id")
    private Long purchaseOrderId;

    /**
     * 物料id
     */
    @Column(name = "material_id")
    private Long materialId;

    /**
     * 物料编码
     */
    @Column(name = "material_code")
    private String materialCode;

    /**
     * 物料品牌
     */
    @Column(name = "material_brand")
    private String materialBrand;

    /**
     * 物料名称
     */
    @Column(name = "material_name")
    private String materialName;

    /**
     * 物料型号
     */
    @Column(name = "material_model")
    private String materialModel;

    /**
     * 物料类目
     */
    @Column(name = "material_category")
    private String materialCategory;

    /**
     * 申请数量
     */
    @Column(name = "quantity")
    private Integer quantity;

    /**
     * 物料单位
     */
    @Column(name = "material_unit")
    private String materialUnit;

    /**
     * 附件
     */
    @Column(name = "accessory")
    private String accessory;

    /**
     * 状态
     */
    @Column(name = "status")
    private String status;

    /**
     * 附言
     */
    @Column(name = "remark")
    private String remark;

    /**
     * 金额
     */
    @Transient
    private BigDecimal price;

    /**
     * 采购员
     */
    @Transient
    private String buyer;

    /**
     * 申请公司名称
     */
    @Transient
    private String companyName;

    /**
     * 申请部门名称
     */
    @Transient
    private String departmentName;

    /**
     * 附件名称
     */
    @Transient
    private String accessoryName;

    /**
     * id集合
     */
    @Transient
    private Set<Long> ids;

    /**
     * id集合
     */
    @Transient
    private List<Long> notIn;
    
}